package com.handsome.代理模式.静态代理;

/**
 * @author niechun
 * @date 2023/3/9 19:49
 */
public class TeacherDaoProxy implements ITeacher{
    private ITeacher teacher;

    public TeacherDaoProxy(ITeacher teacher) {
        this.teacher = teacher;
    }

    @Override
    public void teach() {
        System.out.println("开始代理");
        teacher.teach();
        System.out.println("结束代理");
    }
}
